<template>
    <div class="ml-10PX policy">
      <el-collapse v-model="activeNames" @change="handleChange">
        <el-collapse-item title="Consistency"  v-for="(item,index) in policyLists.filter(policy=>policy.type==5)" :key="index" :name="index">
          <template #title>
              <img src="https://img.alicdn.com/imgextra/i4/1034622205/O1CN01Sh4Hsv1S9wPDDRYuZ_!!1034622205.png" alt=""/>
            <p class="text-[#333] text-[14PX] mt-2 mb-2 ml-4px">{{item.title}}</p>
            </template>
          <div v-html="item.detail">
            
          </div>
        </el-collapse-item>
      </el-collapse>
    </div>
</template>

<script setup>
const activeNames = ref(null)
const policyLists= ref([])
const props = defineProps({
    policyList: {
    type: Array,
    required: false,
    default: () => []
  },
})
const handleChange = (val) => {
  console.log(val)
}
onMounted(() => {
  policyLists.value = props.policyList.filter(at=>at.title!='')
})
</script>

<style lang="scss" scoped>
.policy{
  p{
    font-size: 14PX;
  }
  img{
    width: 14PX;
    height: 14PX;
    border-radius: 50%;
  }
  :deep(.el-collapse-item__header){
     height: 30PX;
    line-height: 30PX;
    font-size: 12PX;
    border: none !important;
  }
}
</style>